<div class="container_12 content-wrapper">
	<div class="grid_9">
    <h2>My Purchases</h2>
   
    	<?php flash();?>
	<?php
	
	if(!empty($pp)){
	
	$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="tbl-list" id="my_pruchases">' );
	$this->table->set_heading('No of Items', 'Status', 'Total', 'Proof of payment', 'Action');
	$this->table->set_template($tmpl);
	
	foreach($pp as $v){
					
		
		$data = array(
				$v->items,
				$v->status,
				$v->total,
				'<img src="'.site_url($v->proof).'" width="100px" height="100px" />',
				'<a href="'.site_url('home/view_purchase/'.$v->order_id).'" class="btn-icon view" title="View Purchase">View Purchase</a>'

		);
		$this->table->add_row($data);	
	}
	echo $this->table->generate();
	}
	else {
		echo '<div class="msg notice"><span></span><h5>Notice</h5>No purchases made yet.</div>';	
	}
?>
    </div>
	 <div class="grid_3">
    	<?php echo $this->load->view('layouts/menu/_customer', TRUE);?>
    </div>
</div>